package com.oceansoft.mobile.econsole.modules.base.biz;

public class AssertUtils {

    /**
     * Assert为非新业务对象
     *
     * @param businessObject BusinessObject
     */
    public static void notNewBusinessObject(IBizObjSerializable businessObject) {
        if (businessObject.isNew()) {
            throw new IllegalArgumentException();
        }
    }

    /**
     * Assert为新业务对象
     *
     * @param bizObjSerializable IBizObjSerializable
     */
    public static void newBusinessObject(IBizObjSerializable bizObjSerializable) {
        if (!bizObjSerializable.isNew()) {
            throw new IllegalArgumentException();
        }
    }
}
